This patch undoes 8697 and makes xm reboot/shutdown work again. This code
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 3 Mar 2006 09:56:54 +0000 (10:56 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 3 Mar 2006 09:56:54 +0000 (10:56 +0100)
does expose a bug in xenstored when it is killed & restarted, but that
is not caused by this code.

My sincere appology to Ke Yu for the long wait and assuming his code
was broken.  His code was perfectly fine. Its just that my test scripts
did something for a historical reason that I should have removed a long
time ago.

Signed-Off-By: Leendert van Doorn <leendert@watson.ibm.com>
tools/python/xen/xend/server/blkif.py

index 23135aa08bf2490063b2e9ca6a2b4b19cef6f879..02cd4f26f7d671dbd32cd6479df37f928bb048ce 100644 (file)
@@ -42,10 +42,6 @@ class BlkifController(DevController):
         """@see DevController.getDeviceDetails"""
 
         dev = sxp.child_value(config, 'dev')
-        if 'ioemu:' in dev:
-            return (None,{},{})
-
-        devid = blkif.blkdev_name_to_number(dev)
 
         (typ, params) = string.split(sxp.child_value(config, 'uname'), ':', 1)
         back = { 'dev'    : dev,
@@ -54,7 +50,13 @@ class BlkifController(DevController):
                  'mode'   : sxp.child_value(config, 'mode', 'r')
                  }
 
-        front = { 'virtual-device' : "%i" % devid }
+        if 'ioemu:' in dev:
+            (dummy, dev1) = string.split(dev, ':', 1)
+            devid = blkif.blkdev_name_to_number(dev1)
+            front = {}
+        else:
+            devid = blkif.blkdev_name_to_number(dev)
+            front = { 'virtual-device' : "%i" % devid }
 
         return (devid, back, front)